package com.zhang.service;

import com.zhang.entity.PaymentInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 * 支付信息表 服务类
 * </p>
 *
 * @author zbw
 * @since 2022-04-23
 */
@Service
public interface PaymentInfoService extends IService<PaymentInfo> {

    //1.创建支付二维码
    String createQrCode(Long orderId) throws Exception;

    //修改支付信息
    PaymentInfo getPaymentInfo(String outTradeNo);

    //修改支付表信息
    void updatePaymentInfo(Map<String, String> aliPayParam);

    //3.退款接口
    boolean refund(Long orderId) throws Exception;

    //4.查询支付宝中是否有交易记录
    boolean queryAlipayTrade(Long orderId) throws Exception;

    //3.交易关闭
    boolean closeAlipayTrade(Long orderId) throws Exception;
}
